import requests

http_headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 '
                  'Safari/537.36 Edg/105.0.1343.33',
    'Connection': 'keep-alive',
}

rp = requests.get("https://www.baidu.com", headers=http_headers)

rp.encoding = rp.apparent_encoding

print(rp.text)
